$OpenBSD: patch-makefile,v 1.14 2012/07/08 12:24:17 shadchin Exp $
--- makefile.orig	Tue Jun 19 05:55:14 2012
+++ makefile	Sat Jul  7 15:16:38 2012
@@ -50,7 +50,8 @@ INSTALL		?= install # Installer utility to use; change
 INSTALL_PROGRAM	?= $(INSTALL) # Command to install executable program files.
 INSTALL_DATA	?= $(INSTALL) -m 0644 # Command to install data files.
 
-CC_OPTIMIZE	?= -O3 # Default C compiler optimization flags that are safe (but please remove for LLVM/Clang, see "misc/known_bugs.txt").
+CC_OPTIMIZE	=
+#CC_OPTIMIZE	?= -O3 # Default C compiler optimization flags that are safe (but please remove for LLVM/Clang, see "misc/known_bugs.txt").
 # Be sure and run tests to see if Mathomatic works and runs faster, if you uncomment the following line:
 #CC_OPTIMIZE	+= -fno-signaling-nans -fno-trapping-math -fomit-frame-pointer # Possible additional optimizations, not tested.
 
@@ -62,7 +63,7 @@ LDLIBS		+= -lm # libraries to link with to create the 
 
 # Run "make READLINE=1" to include the optional readline editing and history support:
 CFLAGS		+= $(READLINE:1=-DREADLINE)
-LDLIBS		+= $(READLINE:1=-lreadline) # Add -lncurses if needed for readline, might be called "curses" on some systems.
+LDLIBS		+= $(READLINE:1=-lreadline) -lncurses # Add -lncurses if needed for readline, might be called "curses" on some systems.
 
 # Uncomment the following line to force generation of x86-64-bit code:
 #CFLAGS		+= -m64
@@ -129,7 +130,7 @@ pdfsheet quickref.pdf: $(AOUT)
 test:
 	@echo
 	@echo Testing ./$(AOUT)
-	cd tests && time -p ../$(AOUT) -t all 0<&- >test.out && diff -u --strip-trailing-cr all.out test.out && rm test.out && cd ..
+	cd tests && time -p ../$(AOUT) -t all 0<&- >test.out && diff -u all.out test.out && rm test.out && cd ..
 	@echo
 	@echo All tests passed.
 
